<?php
/**
 * Created by PhpStorm.
 * User: zy
 * Date: 18/5/23
 * Time: 下午3:09
 */
$api_service_path = __DIR__ . "/../../../api/";
ob_start();
require_once($api_service_path . "public/index.php");
ob_end_clean();
DB::connection()->disableQueryLog(); 

$mo_list=MirrorOrders::select("*");

$mo_list->chunk(1000, function($molist){                    
    foreach ($molist as $mo) {
        $origin_order = Orders::where("order_id",$mo->relation_order)->first();
        
        $mo->meet_time=$origin_order->created_at;
        $mo->save();
        Log::info($mo->order_id." meet_time 已经更新"); 
        echo $mo->order_id." meet_time 已经更新";
    }
}); 

Log::info("镜像单接车时间已经更新"); 
echo "镜像单接车时间已经更新";
